package kr.hkit.androidcomplete03.ch25;

import kr.hkit.androidcomplete03.R;
import android.app.Activity;
import android.os.Bundle;
import android.preference.PreferenceFragment;

public class PreFragmentTest extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		getFragmentManager().beginTransaction().add(android.R.id.content,new PrefsFragment(), "pref").commit();
	}
	
	public static class PrefsFragment extends PreferenceFragment {
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        addPreferencesFromResource(R.xml.prefragmenttest);
	    }
	}
}
